import './App.css';

import createRoute from './router/createRoute';
import {Routes} from "react-router-dom"
import originrouteArr from './router/routeArr';

import { useSelector} from "react-redux"

function App(){
  let userroute = useSelector((state)=>{
    return state.userinforeducer.userRoute
  })
 
  console.log(createRoute(userroute.concat(originrouteArr)))
  return <>
    <div className='App'>
      <h1>路由权限控制的Demo</h1>
      <div>以下是路由显示位置</div>
      <Routes>
        {createRoute(userroute.concat(originrouteArr))}
      </Routes>
    </div>
    
  </>
}


export default App;
